using System;
using System.Collections.Generic;
using System.Text;
using System.Diagnostics;

namespace Codeplex.SPCleanup.Library.Utils
{
    public class Log
    {
        /// <summary>
        /// Replace the trace writer code below with your customary logger
        /// Use this method when you would like to log debug statements. Typically these would be your traceability 
        /// statements helping you debug a given problem purely by using log statements. By default this level of
        /// logging would be turned off in production boxes by the time code reaches stability point
        /// </summary>
        /// <param name="log">Log statement</param>
        public static void Debug(string log)
        {
            System.Diagnostics.Trace.Write(string.Format("Debug: {0}",log));
        }

        /// <summary>
        /// Replace the trace writer code below with your customary logger
        /// Use this method when you would like to log informational statements. Typically these would be your 
        /// customary info providers as the code hits various methods. Log customer name in presentation layer,
        /// customer id in middleware and customer internal id (as stored in db) at data access layer
        /// </summary>
        /// <param name="log">Log statement</param>
        public static void Info(string log)
        {
            System.Diagnostics.Trace.Write(string.Format("Info: {0}", log));
        }

        /// <summary>
        /// Replace the trace writer code below with your customary logger
        /// Use this method when you would like to log Warning statements. Typically this would be used when you would
        /// like to know of certain scenarios which wouldn't have occured in a normal happy path. An example would be 
        /// in the case where you are unable to locate a customer record in the database where the middleware has given
        /// you a customer id.
        /// </summary>
        /// <param name="log">Log statement</param>
        public static void Warn(string log)
        {
            System.Diagnostics.Trace.Write(string.Format("Warn: {0}", log));
        }

        /// <summary>
        /// Replace the trace writer code below with your customary error logger
        /// Use this method when you would like to log errors. Typically you would use when an unexpected situation has 
        /// arised and you would like a monitor mechanism (like MOM) to alert the project team.
        /// </summary>
        /// <param name="log">Log statement</param>
        public static void Error(string log)
        {
            System.Diagnostics.Trace.Write(string.Format("Error: {0}", log));
        }
    }
}
